In a VXLAN network, multiple equal-cost paths may exist between two VXLAN tunnel end points (VTEP) for load sharing. When a failure occurs in a certain link in the multiple equal-cost paths, the failed link needs to be detected quickly to prevent the traffic from being sent to this failed link. In existing technologies, in order to detect multiple equal-cost paths that may exist among links, a starting point VTEP sequentially increases a source port in a UDP header of an outer layer of an encapsulated detection message by one according to an order of the message, with a purpose of traversing all paths. In a situation in which multiple equal-cost paths that are cascading exist (for example, a node A has two equal-cost paths to a node B and a node C individually, the node B also has two equal-cost paths to a node D and a node E individually, and hash path selection algorithms of the node A and the node B both include source ports), the node A may transmit detection messages having source ports as odd numbers (source and destination IPs remain unchanged) to the node B, and transmit detection messages having source ports as even numbers to the node C, while the node B transmits detection message having source ports as odd numbers to the node C. Therefore, no detection message pass through a link from the node B to the node D. As can be seen, the existing technologies depend largely on hash path selection algorithms of node devices, and cannot ensure that all paths are traversed.